﻿@using UCosmic.Www.Mvc.Areas.Identity.Models.Self
@model PersonForm
<div id="person_self_editor">
    <div class="hidden-input">
        @Html.EditorFor(m => m.RevisionId)
        @Html.EditorFor(m => m.EntityId)
        @Html.EditorFor(m => m.UserId)
    </div>
    <div class="field no-bottom ui-helper-clearfix" data-ucosmic-val="css">
        <span class="label" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.DisplayName)
        </span>
        <div class="input" 
             data-ucosmic-person-derive-display-name="true" 
             data-ucosmic-person-derive-display-name-checkbox="@Html.IdFor(m => m.IsDisplayNameDerived)"
             data-ucosmic-person-derive-display-name-textbox="@Html.IdFor(m => m.DisplayName)"
             data-ucosmic-person-derive-display-name-url="@Url.Action(MVC.Identity.Self.DeriveDisplayName())">
            <div class="text-box input" 
                 data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.DisplayName, ViewData).Watermark)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true"
                >
                @Html.EditorFor(m => m.DisplayName)
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.DisplayName)</span>
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix">
        <span class="label">&nbsp;</span>
        <div class="input">
            <div class="check-box input">
                @Html.EditorFor(m => m.IsDisplayNameDerived)
                @Html.LabelFor(m => m.IsDisplayNameDerived)
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix @Html.IdFor(m => m.Salutation)-field" data-ucosmic-val="css">
        <span class="label" data-ucosmic-val-hide="error" data-ucosmic-val-show="valid" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.Salutation)
        </span>
        <div class="input">
            <div class="combobox" data-ucosmic-autocomplete="true" 
                data-ucosmic-autocomplete-url="@Url.Action(MVC.Identity.Self.AutoCompleteNameSalutations())">
                <div class="text-box input" data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.Salutation, ViewData).NullDisplayText)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true">
                    @Html.EditorFor(m => m.Salutation)
                </div>
                <a class="text-box down-arrow">
                    <img class="text-box down-arrow" alt="" src="/content/icons/transparent.png">
                </a>
                <div class="autocomplete-menu">
                </div>
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.Salutation)</span>
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix" data-ucosmic-val="css">
        <span class="label" data-ucosmic-val-hide="error" data-ucosmic-val-show="valid" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.FirstName)
        </span>
        <div class="input">
            <div class="text-box input" data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.FirstName, ViewData).NullDisplayText)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true">
                @Html.EditorFor(m => m.FirstName)
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.FirstName)</span>
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix" data-ucosmic-val="css">
        <span class="label" data-ucosmic-val-hide="error" data-ucosmic-val-show="valid" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.MiddleName)
        </span>
        <div class="input">
            <div class="text-box input" data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.MiddleName, ViewData).NullDisplayText)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true">
                @Html.EditorFor(m => m.MiddleName)
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.MiddleName)</span>
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix" data-ucosmic-val="css">
        <span class="label" data-ucosmic-val-hide="error" data-ucosmic-val-show="valid" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.LastName)
        </span>
        <div class="input">
            <div class="text-box input" data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.LastName, ViewData).NullDisplayText)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true">
                @Html.EditorFor(m => m.LastName)
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.LastName)</span>
            </div>
        </div>
    </div>
    <div class="field ui-helper-clearfix @Html.IdFor(m => m.Suffix)-field" data-ucosmic-val="css">
        <span class="label" data-ucosmic-val-hide="error" data-ucosmic-val-show="valid" data-ucosmic-focused-class="focused">
            @Html.LabelFor(m => m.Suffix)
        </span>
        <div class="input">
            <div class="combobox" data-ucosmic-autocomplete="true" 
                data-ucosmic-autocomplete-url="@Url.Action(MVC.Identity.Self.AutoCompleteNameSuffixes())">
                <div class="text-box input" data-ucosmic-watermark="true" 
                 data-ucosmic-watermark-text="@(ModelMetadata.FromLambdaExpression(m => Model.Suffix, ViewData).NullDisplayText)"
                 data-ucosmic-watermark-class="watermark" data-ucosmic-watermark-focused-class="focused"
                 data-ucosmic-trim-input="true">
                    @Html.EditorFor(m => m.Suffix)
                </div>
                <a class="text-box down-arrow">
                    <img class="text-box down-arrow" alt="" src="/content/icons/transparent.png">
                </a>
                <div class="autocomplete-menu">
                </div>
            </div>
            <div class="messages" data-ucosmic-focused-class="focused">
                <div class="top callout border">
                    <div class="top callout bg">
                    </div>
                </div>
                <span class="validation">@Html.ValidationMessageFor(m => m.Suffix)</span>
            </div>
        </div>
    </div>
    <div class="field">
        <span class="label">&nbsp;</span>
        <div class="input">
            <input id="person_name_submit_button" type="submit" value="Save Changes" />
            @Html.Partial(MVC.Shared.Views.form_submitted_spinner)
        </div>
    </div>
</div>
